import sys
import os
sys.path.append(os.path.dirname(__file__))
from google.appengine.tools import bulkloader

class UnicodeCharExporter(bulkloader.Exporter):
  def __init__(self):
    bulkloader.Exporter.__init__(self, 'UnicodeChar',
                                 [('code', str, None),
                                  ('name', str, None),
                                  ('category', str, None),
                                  ('unicode10', str, None),
                                 ])

exporters = [UnicodeCharExporter]

class UnicodeCharLoader(bulkloader.Loader):
  def __init__(self):
    bulkloader.Loader.__init__(self, 'UnicodeChar',
                               [('code', lambda s: int(s, 16)),
                                ('name', str),
                                ('category', str),
                                ('combining', int),
                                ('bidi', str),
                                ('decomposition', str),
                                ('decimal', str),
                                ('digit', str),
                                ('numeric', str),
                                ('mirrored', str),
                                ('unicode10', str),
                                ('comment', str),
                                ('upper', str),
                                ('lower', str),
                                ('title', str),
                               ])

loaders = [UnicodeCharLoader]